﻿// <copyright file="ValueLookupExtensions.cs" company="http://www.dymetis.com">
//
// Copyright (c) 2011 Eddie Z. Lin.
//
// This source is subject to the Microsoft Public License.
// See http://www.opensource.org/licenses/ms-pl.
// All other rights reserved.
// 
// </copyright>

namespace Dymetis.Expressions
{
    using System.Collections.Generic;
    using System.Xml.Linq;

    public static class ValueLookupExtensions
    {
        public static IValueLookup AsParameterProvider<TValue>(this IDictionary<string, TValue> dictionary)
        {
            return new DictionaryValueLookup<TValue>(dictionary);
        }

        public static IValueLookup AsParameterProvider(this XNode node)
        {
            return new XValueLookup(node);
        }
    }
}
